The present invention relates to methods and systems for processing a continuous-tone image to provide an encoded display image suitable for printing on a print medium. More particularly, the present invention provides a method of error diffusion that reduces long-range artifacts in a printed image.
Computer-generated images and images formed by photographic techniques have typically continuous tonality. That is, each pixel of such a continuous-tone image has a color value, such as a xe2x80x9cgray scalexe2x80x9d value, that lies in a particular range. For example, if an 8-bit word represents such a pixel, the pixel can have 256 distinct color values. Printing devices, such as laser or ink-jet printers, represent such an image by printing a plurality of picture elements or pixels on a print medium. Such printers, however, typically provide only a few output states, i.e., color value levels, for each printed pixel. For example, ink jet printers, typically operate with two levels. That is, these printers typically print a pixel either as a color dot on a print medium or leave the location of the pixel blank.
Accordingly, before printing an image, the pixels are preprocessed by comparing the color value of each pixel with one or a number of thresholds, to assign to each pixel one of a set of output states, for example color or blank in a binary system. The difference between the value of each pixel and the value of the output state representing the pixel introduces quantization artifacts into the printed image.
A number of error diffusion methods, such as the method described in U.S. Pat. No. 5,325,211, for ameliorating such artifacts are known in the art. Such error diffusion methods typically forwardly distribute fractional portions of the quantization error associated with a pixel to a selected group of pixels or to a set of neighboring pixels in an image. Conventional error diffusion methods, however, generally create a number of artifacts. One such artifact, commonly referred to as xe2x80x9cwormsxe2x80x9d, become noticeable for relatively large regions of uniform or gradually varying color. The xe2x80x9cwormsxe2x80x9d appear as curved or straight diagonal lines in areas of uniform gray or produce a patterned appearance in the image. Another type of artifact, typically referred to as xe2x80x9climit cycle patternsxe2x80x9d occur, for example, in an 8-bit system around pixels having color values 85, 128, and 170. Fan and Eschbach analyzed such xe2x80x98limit cycle patternsxe2x80x99 in a paper entitled xe2x80x9cLimit cycle behavior of error diffusionxe2x80x9d, published in Proceedings of the 1994 1st IEEE International Conference on Image Processing, Austin, Tex., pages 1041-1045, and herein incorporated by reference. Fan and Eschbach found that the stability of such patterns creates problems at nearby gray levels because the pattern extends over large portions of the image until sufficient error is accumulated to disrupt it. Such a disruption is typically pronounced enough to be visible as a defect in a uniform field.
Accordingly, it is an object of the present invention to provide a method for converting a continuous-tone image to a display image for printing, which reduces artifacts in the printed image.
The present invention provides a method for converting a continuous-tone image represented by a plurality of electronically encoded pixels into an encoded display image for electronic printing. The method of the invention selects each electronically encoded pixel sequentially, and compares the color value of the selected pixel with selected thresholds. Subsequently, the method selects an output state from a set of states, for example one of a set of binary states, based on a comparison of the color value of the selected electronically encoded pixel with the selected thresholds, for displaying the pixel on a print medium. In a subsequent step, the method obtains an error value indicative of a difference between the selected output state and the color value of the pixel, and modifies the color value of each of a selected group of subsequent pixels, which are to be processed in a similar manner after processing the selected pixel, by a weighted fractional portion of the error value. The method of the invention selects the weighted fractional portions based on the color value of the selected pixel, i.e., the pixel being processed, and also based on the position of this pixel in the image. The steps delineated above are repeated for all of the electronically encoded pixels to convert the continuous-tone image into an encoded display image for electronic printing.
In one aspect, the method of the invention selects the weighted fractional error portions such that their sum is one. In another aspect, the method selects the electronically encoded pixels sequentially in a raster pattern.
According to another aspect of the invention, the electronically encoded pixels form a two-dimensional array to represent an image. One preferred practice of the invention divides such a two-dimensional array into a plurality of segments and selects the weighted fractional portions such that two pixels residing in the same segment and having color values in a selected range have the same weighted fractional portions.
In another aspect, the method of the invention selects the weighted fractional portions to be the same for a selected plurality of contiguous pixels in at least one of the plurality of segments into which an array of electronically encoded pixels is divided.
Another aspect of the invention relates to an image processing system for converting a plurality of electronically encoded pixels, stored for example in an input buffer, into an encoded display image for electronic printing. An image processing system according to the invention includes a buffer controller for sequentially selecting one of the pixels stored in the input buffer. A first summing circuit receives the color value of the selected pixel and modifies the color value based on a fractional error value obtained from a previously processed pixel, to obtain a modified color value. An image register receives the modified color value and temporarily stores the value. A comparator receives the modified value from the image register and compares the modified value with a selected threshold and chooses one of a plurality of output states based on the comparison, where the selected output state represents the selected electronically encoded pixel in the printed image. A change sign inverter receives the selected output state and produces a sign-inverted output state. A second summing circuit receives the modified color value and the sign-inverted output state to produce an error value that is indicative of a difference between the modified color value and the output state. A modifier receives the error value from the summing circuit, and receives a weighted fraction according to the teachings of the invention from a look-up table and modifies the error value based on the weighted fraction, to obtain a fractional error value. The weighted fraction is selected based on the color value of the selected pixel and its position within the electronically encoded image according to the teachings of the present invention. The fractional error value is stored in an error buffer, to be applied to a subsequent pixel.
In another aspect, the image processing system optionally includes a threshold modifier that receives the color value of the selected pixel and calculates a threshold modifying value based on the color value of the pixel and a selected multiplier. Further, a threshold calculation subtractor receives the threshold modifying value and subtracts the threshold modifying value from a nominal threshold value, to obtain the selected threshold for a pixel being processed.
Another aspect of the invention provides a printer for printing an image of a continuous-tone representation of a plurality of electronically encoded pixel, where each pixel specifies a color value, as a pattern of dots on a print medium. Each dot represents a selected output state value. The printer includes an error diffuser that receives the plurality of pixel values and converts the pixel values into an encoded display image. In particular, the diffuser distributes a difference between a color value of a pixel and the output state value of a dot representing the pixel to selected subsequent pixels based on the color value of the pixel and its location relative to the other pixels in the continuous-tone representation. A printing mechanism receives the encoded display image and generates the pattern of dots on the print medium.
In one aspect, the printer provides a two dimensional array of dots representing a two-dimensional array of electronically encoded pixels. In another aspect, the diffuser provides a plurality of weighted fractional portions based on the difference between the color value of a pixel and the output state value associated with a previous pixel and adds these fractional portions to selected subsequent pixels.